package com.freightoa.foundation.presentation.composable

import android.content.Context
import android.view.inputmethod.InputMethodManager

// 提取隐藏键盘的公共方法

fun hideKeyboards(context: Context) {
    val inputMethodManager = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
    inputMethodManager.hideSoftInputFromWindow(
        (context as android.app.Activity).currentFocus?.windowToken,
        0
    )
}